
#ifndef _UART_H_
#define _UART_H_
#include  <stdio.h>      
#include  <stdlib.h>    
#include  <unistd.h>    
#include  <sys/types.h>  
#include  <sys/stat.h>   
#include  <fcntl.h>     
#include  <termios.h>    
#include  <errno.h>   
#include  <string.h>  
//宏定义  
#define FALSE  -1  
#define TRUE   0  


int uart_open(int fd,const char *pathname);
void uart_close(int fd);
int uart_set(int fd,int baude,int c_flow,int bits,char parity,int stop);
int uart_init(int fd, int speed,int flow_ctrl,int databits,int stopbits,int parity);
int uart_recv(int fd, char *rcv_buf,int data_len) ;
int uart_send(int fd, char *send_buf,int data_len) ;

#endif



